#version 330
layout(location = 0) in vec3 vertex;
layout(location = 1) in vec3 color;
layout(location = 2) in vec3 normal;
out vec3 f_vertex;
out vec3 f_color;
out vec3 f_normal;
uniform mat4 projMatrix;
uniform mat4 mvMatrix;
uniform mat3 normalMatrix;
uniform vec4 plane;
void main(){
	f_vertex = vertex;
	f_color = color;
	f_normal = normalMatrix * normal;
	gl_Position = projMatrix * mvMatrix * vec4(vertex, 1.0);
	gl_ClipDistance[0] = dot(plane, vec4(vertex, 1.0));
};